package com.love.marriage.userChatInfo.mapper;

import com.love.marriage.userChatInfo.entity.UserChatInfo;
import com.love.marriage.userChatInfo.vo.UserChatInfoVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import com.love.marriage.common.interfaces.permission.DataPermission;

/**
 * description:  用户聊天记录表 mapper
 * author:       mybatisPlus
 * createDate:   2024-10-20 01:13:08
 * version:      1.0.0
 */
@Mapper
public interface UserChatInfoMapper extends BaseMapper<UserChatInfo> {

    @DataPermission(table = "user_chat_info_t")
    Page<UserChatInfoVo> getPage(Page<UserChatInfoVo> page, @Param("userChatInfoVo") UserChatInfoVo userChatInfoVo);

    UserChatInfoVo queryUserChatInfo(@Param("id") Long id);

    UserChatInfoVo queryUserChatInfoByUserId(@Param("userId") Long userId,
                                             @Param("type") String type);
}
